package demo8;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.sql.Connection;
import java.sql.SQLException;

public class demo
{
    public static void main(String[] args) throws SQLException {
        AnnotationConfigApplicationContext an=
                new AnnotationConfigApplicationContext(config.class);
//        person p=an.getBean(person.class);
//        System.out.println(p);
        dbutil db=an.getBean(dbutil.class);
        Connection con=db.getConnection();
        System.out.println(con);
    }
}
